package chapter1.No1_8_暂停线程.b缺点_独占;

/**
 * Created by Administrator on 2016/11/9.
 */
public class T2_MyThread extends Thread {
    private int i = 0;
    @Override
    public void run() {
        while(true) {
            i++;
            System.out.println(i);
        }
    }

    public static void main(String[] args) throws InterruptedException {
        T2_MyThread m1 = new T2_MyThread();
        m1.start();
        Thread.sleep(500);
        m1.suspend();
        System.out.println("END");
    }
}
